package com.ylz.sjzx.sio.sdk.model;

import com.ylz.sjzx.sio.common.core.enums.Cmd;
import com.ylz.sjzx.sio.common.core.enums.Role;
import com.ylz.sjzx.sio.common.core.enums.SocketModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author wiqi
 * @version 1.0
 * @date 2020/12/12
 */
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class ChatRoomMessage implements Serializable {
    private static final long serialVersionUID = 6657878366192365310L;
    private Cmd cmd;

    private String userId;

    private String realname;

    private String roomName;

    private String groupName;

    /**
     * 宿主机ip
     */
    private String hostIp;

    /**
     * 通信模式
     */
    private SocketModel socketModel;

    /**
     * 意思是消息向哪个组发送
     * 更好些
     */
    private String toGroupName;

    /**
     * socketId
     */
    private String sid;

    /**
     * 角色限制广播的量
     * 没有角色 全体广播
     */

    private Role role;

    /**
     * 学生的话是 向管理组广播消息
     * 老师的话为false就行
     */
    private boolean toAdmin;

    /**
     * 发送时间
     */
    private String sendDate;

    private Object message;

    /**
     * 临时
     */
    @Deprecated
    private int messageSize;


    private boolean single = false;


}
